﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RestaurateurConsole
{
    public partial class SplashScreen : Form
    {
        bool gotClose = false;
        bool ticked = false;
        public SplashScreen()
        {
            Timer t = new Timer();
            t.Interval = 2000;
            t.Tick += new EventHandler(t_Tick);
            t.Start();
            InitializeComponent();
        }

        void t_Tick(object sender, EventArgs e)
        {
            if (!gotClose)
            {
                ticked = true;
                this.Close();
            }
        }

        public void Done()
        {
            if (!ticked)
            {
                gotClose = true;
                this.Close();
            }
        }
    }
}
